package com.dayu.design.common;

import com.dayu.design.创建型.简单工厂模式.Circle;
import com.dayu.design.创建型.简单工厂模式.Rectangle;
import com.dayu.design.创建型.简单工厂模式.Shape;
import com.dayu.design.创建型.简单工厂模式.Square;

/**
 * @author dayu
 * @create 2023-11-28 17:15
 */
public enum ShapeEnum {
    RECTANGLE(Rectangle.class),
    SQUARE(Square.class),
    CIRCLE(Circle.class);

    Class<? extends Shape> clazz;

    ShapeEnum(Class<? extends Shape> clazz) {
        this.clazz=clazz;
    }

    public Class<? extends Shape> getClazz() {
        return clazz;
    }
}
